package com.kldaby.controller;

import com.kldaby.service.NaiveWaiter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
public class TestController {

    @Autowired
    private NaiveWaiter naiveWaiter;

    @RequestMapping("/test")
    @ResponseBody
    public String testTo(HttpServletRequest request,String name) {
        naiveWaiter.greetTo(name);
        naiveWaiter.serveTo(name);
        naiveWaiter.getMessage();
        return name;
    }
}
